package net.zjitc.abstracts.shape;

import java.util.Scanner;

/**
 * @Author admin
 * @Date 2019/3/20 10:39
 * 测试类
 */
public class Test {
    public static void main(String[] args) {
       /* *//* 利用多态的方式创建对象*//*
        Shape shape=new Circle(2);
        shape.output();*/

        System.out.println("1--圆形\n2--三角形");
        Scanner scanner=new Scanner(System.in);
        int a=scanner.nextInt();
        /* 调用工厂类的方法获得对象*/
        Shape shape=ShapeFactory.getShape(a);
        shape.output();
    }
}
